/**
 * 座位可售票类型
 * @returns
 */
export const SEAT_SALE_TYPE = {
    List: [
        {value: '1', name: '不限', style: 'light'},
        {value: '2', name: '成人', style: 'success'},
        {value: '3', name: '儿童', style: 'danger'}
    ],
    getItem: function (val) {
        for (let i = 0; i < this.List.length; i++) {
            if (val == this.List[i].value) {
                return this.List[i];
            }
        }
    }
}

/**
 * 座位可售票类型
 * @returns
 */
export const SEAT_STATUS = {
    CAN_SALE: 1,
    DID_SALE: 2,
    LOCK: 3,
    NO_SALE: 4,
    List: [
        {value: 1, name: '可售', style: 'success'},
        {value: 2, name: '已售', style: 'danger'},
        {value: 3, name: '锁定', style: 'warning'},
        {value: 4, name: '不可售', style: 'info'}
    ],
    getItem: function (val) {
        for (let i = 0; i < this.List.length; i++) {
            if (val == this.List[i].value) {
                return this.List[i];
            }
        }
    }
}

/**
 * 管理员类型
 * @returns
 */
export const ADMIN_TYPE = {
    GENERAL: 0,
    SUPER_ADMIN: 1,
    List: [
        {value: 0, name: '普通用户', style: 'success'},
        {value: 1, name: '超级管理员', style: 'danger'}
    ],
    getItem: function (val) {
        for (let i = 0; i < this.List.length; i++) {
            if (val == this.List[i].value) {
                return this.List[i];
            }
        }
    }
}

/**
 * 成功失败
 * @returns
 */
export const SUCCESS_FAIL = {
    SUCCESS: 0,
    FAIL: 1,
    List: [
        {value: 0, name: '失败', style: 'danger'},
        {value: 1, name: '成功', style: 'success'}
    ],
    getItem: function (val) {
        for (let i = 0; i < this.List.length; i++) {
            if (val == this.List[i].value) {
                return this.List[i];
            }
        }
    }
}

/**
 * 用户状态
 * @returns
 */
export const USER_STATUS = {
    DISABLE: 0,
    NORMAL: 1,
    List: [
        {value: 0, name: '禁用', style: 'danger'},
        {value: 1, name: '正常', style: 'success'}
    ],
    getItem: function (val) {
        for (let i = 0; i < this.List.length; i++) {
            if (val == this.List[i].value) {
                return this.List[i];
            }
        }
    }
}